const fs = require('fs')

const Router = require('koa-router')
const router = new Router()
// 获取当前文件夹文件
fs.readdirSync(__dirname).forEach(file => {
  // 非index.js文件加载
  if (file != 'index.js') {
    let r = require('./' + file)
    router.use(r.routes())
  }

})

module.exports = router